/*
 * @Author: ✨Fireflx 
 * @Date: 2022-02-16 08:55:55 
 * @Last Modified by: ✨Fireflx
 * @Last Modified time: 2022-02-16 09:02:30
 */

const mongoose = require('mongoose')

const schema = new mongoose.Schema({
    id:Number,
    title:String,
    createTime:String,
    content:String,
    stemfrom:String,
    author:String,
    read:{
        type:Number,
        default:0
    },
    star:{
        type:Number,
        default:0
    },
    comment:{
        type:Number,
        default:0
    }
})

// 记住不是module，而是model
module.exports = mongoose.model('articles',schema);

